package ua.net.gm.server.walker;

import ua.net.gm.server.primitives.Point;
import ua.net.gm.server.primitives.Rectangle;

/**
 *
 * @author Yason
 */
public interface IWalker
{
    /**
     * Get unsuccessful move count
     * @return fail steps number
     */
    int getFailCount();

    /**
     * Get last unsuccessful move type
     * @return last fail step try
     */
    IWalkerMove getLastFailMove();

    /**
     * Get last unsuccessful moves attempts at a stretch
     * @return last fail steps sequence size
     */
    int getLastFailStreakCount();

    /**
     * Get last successful move type
     * @return last successful move info
     */
    IWalkerMove getLastMove();

    /**
     * Get current position
     * @return position
     */
    Point getPosition();

    /**
     * Get starting position 
     * @return start position
     */
    Point getStartPosition();
    
    /**
     * Get last walker position
     * @return last position
     */
    Point getLastPosition();

    /**
     * Get step tries made by walker count
     * @return step count
     */
    int getStepCount();

    /**
     * Get was last move failed or not
     * @return true if last step was fail by move condition
     */
    boolean isLastMoveFail();

    /**
     * Get walker state - does it stopped to walk
     * @return true if walker stopped
     */
    boolean isStopped();
    
    /**
     * Get walker available area
     * @return area
     */
    Rectangle getArea();
            
    /**
     * Try to make one step, using strategy and move conditions
     */
    void walk();    
}
